<!DOCTYPE HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Menangen | RU</title>
<style type="text/css">

BODY, HTML {
	font-family: Helvetica, Verdana, Arial, sans-serif;
	font-size:10px;

}

.progress { height: 64px; width: 100%;}
</style>

<script type="text/javascript">
	
	function isFileSelected() {
  		
		var file = document.getElementById('form_file').files[0];		
		
		if (file) {
    				var fileSize = 0;
    					if (file.size > 1024 * 1024)
      						fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100).toString() + 'MB';
						else
      						fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + 'KB';
          
   					document.getElementById('FileName').innerHTML = 'Name: ' + file.name;
    				document.getElementById('FileSize').innerHTML = 'Size: ' + fileSize;
	
  					}		

	}
</script>

<body>

<h2>
Hello, <b>$name</b>
</h2>
<p />

Выберите файл:<br />

<p>

<form action="uploader.py" method="post" id="sendFile" enctype="multipart/form-data">
	
	<input type="file" min="1" max="10" multiple="multiple" name="form_file" id="form_file" required="required" title="Необходимо выбрать минимум один файл"
	 onChange="isFileSelected()" />
	<!--<input type="submit" title="Отправить" alt="Отправка файла">-->
	<p>
	<div id="FileName"></div>
	<div id="FileSize"></div>
	<progress title="Uploading..." class="progress" value="0.8"/>
	
 

</form>
</body>
</html>